#include <gtk/gtk.h>

void close_app(GtkWidget *widget,GdkEvent *event,gpointer data){
	gtk_main_quit();
}

int main(int argc,char **argv){
	GtkWidget *window,*pixmap,*fixed;
	GdkPixmap *gdk_pixmap;
	GdkBitmap *mask;
	GtkStyle *style;
	GdkGC *gc;

	gtk_init(&argc,&argv);
	window = gtk_window_new(GTK_WINDOW_POPUP);
	gtk_signal_connect(GTK_OBJECT(window),"delete_event",
		GTK_SIGNAL_FUNC(close_app),NULL);

	//gtk_widget_set_events(window,gtk_widget_get_events(window)|GDK_BUTTON_PRESS_MASK);
	gtk_widget_set_events(window,gtk_widget_get_events(window)|GDK_BUTTON3_MOTION_MASK);

	//gtk_signal_connect(GTK_OBJECT(window),"button_press_event",GTK_SIGNAL_FUNC(close_app),NULL);
	gtk_signal_connect(GTK_OBJECT(window),"motion_notify_event",GTK_SIGNAL_FUNC(close_app),NULL);
	gtk_widget_show(window);

	style = gtk_widget_get_default_style();
	gc = style->black_gc;
	gdk_pixmap = gdk_pixmap_create_from_xpm(window->window,&mask,
		&style->bg[GTK_STATE_NORMAL],"./start.xpm");
	pixmap = gtk_pixmap_new(gdk_pixmap,mask);
	gtk_widget_show(pixmap);
	fixed = gtk_fixed_new();
	gtk_widget_set_usize(fixed,256,256);
	gtk_fixed_put(GTK_FIXED(fixed),pixmap,0,0);
	gtk_container_add(GTK_CONTAINER(window),fixed);

	gtk_widget_shape_combine_mask(window,mask,0,0);
	gtk_widget_set_uposition(window,20,400);
	gtk_widget_show_all(window);
	gtk_main();
	return 0;
}